<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"  
    xmlns:p="http://primefaces.org/ui"> 
	<h:head>
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	    <link rel="stylesheet" type="text/css" href="format.css" />
	    <title><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.title}"/></title>
	</h:head>
	<h:body>
	     <ui:composition template="template.xhtml">
	        <ui:define name="ui_right">
<h:form id="wiadomosc">
			<h3>
			<h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.title}"/>
			</h3>
			<span class="daty">Ważne od: <b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.startDate}"/></b></span>
			<br/>
			<span class="daty"><h:outputText value="Ważne do:"/> <b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.expireDate}"/></b></span>
			<br/>
			<br/>
				<h:outputText style="font-size:1.3em;" value="#{displayAdvertisementsBean.selectedAdvertisement.content}"/>
				
				<p>
					<p:panel style="background-color:#ddd; width:300px; display:block; ">
						<h:outputText value="Użytkownik: "/><b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.user.login}"/></b>
					</p:panel><br/>
					<p:panel style="background-color:#ddd; width:300px; margin:0px; display:block; "
						rendered="#{!displayAdvertisementsBean.selectedAdvertisement.user.firstName.isEmpty()}">
						<h:outputText value="Imię: "/>
					<b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.user.firstName}"/></b>
					</p:panel><br/>
					<p:panel style="background-color:#ddd; width:300px; margin:0px; display:block; "
							rendered="#{!displayAdvertisementsBean.selectedAdvertisement.user.lastName.isEmpty()}">
						<h:outputText value="Nazwisko: "/>
						<b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.user.lastName}"/></b>
					</p:panel><br/>
					<p:panel style="background-color:#ddd; width:300px; margin:0px; display:block; "
							rendered="#{!displayAdvertisementsBean.selectedAdvertisement.user.email.isEmpty()}">
						<h:outputText value="Adres e-mail: "/>
					<b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.user.email}"/></b>
					</p:panel><br/>
					<p:panel style="background-color:#ddd; width:300px; margin:0px; display:block; "
							rendered="#{!displayAdvertisementsBean.selectedAdvertisement.user.phoneNumber.isEmpty()}">
						<h:outputText value="Numer telefonu: "/>
					<b><h:outputText value="#{displayAdvertisementsBean.selectedAdvertisement.user.phoneNumber}"/></b>
					</p:panel><br/>
				</p>

<h:commandLink value="Powrót" action="index"/>
<h:outputText/>
</h:form>
	        </ui:define>
	    </ui:composition>
	</h:body>

</html>